Benjamin Otte [Sun, 19 May 2019 19:34:13 +0000 (21:34 +0200)]
testsuite: Add empty node tests
For every node type, add a test that creates it empty and ensure that
it prints the reference output.
Benjamin Otte [Sun, 19 May 2019 18:20:09 +0000 (20:20 +0200)]
rendernodeparser: Allow parsing strings
Instead of only allowing for glyph indexes, allow ASCII characters as
replacements. So this glyph sequence
glyphs: 65 8, 66 8, 67 8
Can be replaced by
glyphs: "ABC"
provided that the glyph for "A", "B" and "C" are 65, 66 and 67
respectively and their advance is exactly 8.
x offset and y offset must always be 0 and every glyph must start a
cluster.
Benjamin Otte [Sat, 18 May 2019 21:06:34 +0000 (23:06 +0200)]
rendernodeparser: Update to new rules
Update to the docs outlined in #1887.
In particular, the changes do:
1. Require no property, have a working default for everything
2. Be clear about what gets printed and how.
Tests ahve been adapted to still pass.
Benjamin Otte [Tue, 14 May 2019 20:23:15 +0000 (22:23 +0200)]
rgba: Add GDK_RGBA() macro
So far it's private, but it's a pretty cute way to use hex colors, so we
might conside making it public.
Benjamin Otte [Sun, 19 May 2019 02:08:29 +0000 (04:08 +0200)]
rendernode: Take a graphene_point_t for the offset
... instead of 2 floats.
Benjamin Otte [Tue, 14 May 2019 01:20:09 +0000 (03:20 +0200)]
testsuite: Redo node-parser
Base the rewrite on testsuite/css/parser/test-css-parser - we now
require the node file to match a reference node and track the errors it
triggers.
We also no longer use gtester.
Benjamin Otte [Tue, 14 May 2019 00:49:19 +0000 (02:49 +0200)]
rendernodeparser: Skip root node when it's a container
When printing, behave the same way as when parsing:
Magically skip a container node if there is one - just like the
parser magically creates a container node to hold all the nodes
it parses.
Benjamin Otte [Mon, 13 May 2019 22:41:49 +0000 (00:41 +0200)]
rendernodeparser: Allow single values instead of 4
This allows writing:
colors: red;
instead of
colors: red red red red;
to draw a red border.
Benjamin Otte [Tue, 14 May 2019 01:11:33 +0000 (03:11 +0200)]
rendernodeparser: Print properties alphabetically
Because now we have a rule.
Also update some tests to the new order.
Benjamin Otte [Tue, 21 May 2019 03:41:06 +0000 (05:41 +0200)]
glrenderer: Handle NULL debug messages
Matthias Clasen [Tue, 21 May 2019 00:03:25 +0000 (00:03 +0000)]
gtk-demo: Fix menubutton usage in listbox demo
Menu buttons are no longer buttons, so they
can't have children, and don't have a relief
property.
Matthias Clasen [Mon, 20 May 2019 23:33:07 +0000 (23:33 +0000)]
inspector: Don't apply button api to menu buttons
Timm Bäder [Mon, 20 May 2019 10:10:12 +0000 (12:10 +0200)]
gl renderer: Pass correct matrix category when rendering offscreen
We can't just pretend we have an identity matrix when we are actually
scaling. This fixes the node editor sometimes not drawing things when
rendering to a texture. We were mistakenly discaring render nodes
because the bounds transformation was wrong.
Timm Bäder [Mon, 20 May 2019 09:08:50 +0000 (11:08 +0200)]
gl renderer: Delete render_texture framebuffer
Timm Bäder [Mon, 20 May 2019 07:33:55 +0000 (09:33 +0200)]
gl renderer: A GdkGLTexture's context might be NULL
gdk_gl_texture_download ought to still work, but we can't make a NULL
context current obviously.
Timm Bäder [Mon, 20 May 2019 06:47:41 +0000 (08:47 +0200)]
gl renderer: Really fix gl debugging code
Properly label an object and make sure we have the right gl context even
after a gdk_gl_context_end_frame call.
Matthias Clasen [Sun, 19 May 2019 23:52:57 +0000 (23:52 +0000)]
builder-tool: Remove debug spew
Matthias Clasen [Sun, 19 May 2019 21:12:37 +0000 (17:12 -0400)]
x11: Remove to unused settings
We no longer have settings for gtk-button-images
or gtk-menu-images.
Matthias Clasen [Sun, 19 May 2019 21:12:24 +0000 (17:12 -0400)]
lock button: Don't allow subclassing
Matthias Clasen [Sun, 19 May 2019 21:05:40 +0000 (21:05 +0000)]
link button: Don't allow subclassing
Matthias Clasen [Sun, 19 May 2019 20:45:23 +0000 (16:45 -0400)]
Fix a compiler warning
Matthias Clasen [Sun, 19 May 2019 20:45:42 +0000 (16:45 -0400)]
popover menu: Make not subclassable
Matthias Clasen [Sun, 19 May 2019 20:34:49 +0000 (20:34 +0000)]
popover: Cosmetics
Use the same amount of padding as everywhere else.
Matthias Clasen [Sun, 19 May 2019 20:34:13 +0000 (20:34 +0000)]
volume button: Don't allow subclassing
If you want to subclass, there's GtkScaleButton.
Matthias Clasen [Sun, 19 May 2019 20:04:47 +0000 (20:04 +0000)]
settings: Drop the priv pointer
Matthias Clasen [Sun, 19 May 2019 19:52:34 +0000 (19:52 +0000)]
application window: Drop the priv pointer
Matthias Clasen [Sun, 19 May 2019 19:20:23 +0000 (15:20 -0400)]
sizegroup: Drop the priv pointer
Matthias Clasen [Sun, 19 May 2019 19:13:19 +0000 (15:13 -0400)]
settings: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 19:09:36 +0000 (15:09 -0400)]
Forgotten file
Matthias Clasen [Sun, 19 May 2019 19:03:49 +0000 (19:03 +0000)]
shortcuts window: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 18:41:33 +0000 (18:41 +0000)]
css provider: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 17:49:07 +0000 (17:49 +0000)]
size group: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 17:29:37 +0000 (13:29 -0400)]
password entry: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 17:02:50 +0000 (17:02 +0000)]
Padding review
Ensure that the class structs of all subclassable
types have sufficient padding (standardizing on 8
slots, here).
GtkBox
GtkButton
GtkDrawingArea
GtkFixed
GtkFrame
Matthias Clasen [Sun, 19 May 2019 16:50:49 +0000 (16:50 +0000)]
Revert "wayland: Make popups work more than once"
This reverts commit
e74c655016982272b72dff318b11602b0d5b099a.
Matthias Clasen [Sun, 19 May 2019 16:49:45 +0000 (16:49 +0000)]
message dialog: Make not subclassable
Part of being more explicit about what
we allow to be subclassed and what not.
Matthias Clasen [Sun, 19 May 2019 15:41:12 +0000 (15:41 +0000)]
Padding review
Ensure that the class structs of all subclassable
types have sufficient padding (standardizing on 8
slots, here).
GtkApplication
GtkWidget
GtkContainer
GtkWindow
GtkDialog
GtkApplicationWindow
GtkToolItem
GtkBin
Matthias Clasen [Sun, 19 May 2019 15:31:23 +0000 (15:31 +0000)]
Cosmetic changes
Use new-style padding for GdkContentProviderClass.
Matthias Clasen [Sun, 19 May 2019 15:29:04 +0000 (15:29 +0000)]
Trivial: Remove a few +'s
Matthias Clasen [Sun, 19 May 2019 15:20:52 +0000 (15:20 +0000)]
Merge branch 'frame-pixel-counter' into 'master'
profiling: Add a counter for pixels drawn per frame
See merge request GNOME/gtk!855
Matthias Clasen [Sun, 19 May 2019 04:41:38 +0000 (04:41 +0000)]
wayland: Make popups work more than once
The change to keep some server resources around
until destroy was causing us to not recreate
the right things when a surface is hidden and
then shown again. Make sure to recreate everything.
Matthias Clasen [Sun, 19 May 2019 04:14:56 +0000 (04:14 +0000)]
widget-factory: menu buttons can't have children
GtkMenuButton is no longer a container, so we
can't pack children in it.
Benjamin Otte [Sat, 18 May 2019 19:24:47 +0000 (19:24 +0000)]
Merge branch 'wayland-surface-unmap' into 'master'
wayland: Keep some resources until destroy
Closes #1485
See merge request GNOME/gtk!857
Matthias Clasen [Sat, 18 May 2019 19:15:47 +0000 (19:15 +0000)]
wayland: Keep some resources until destroy
The Wayland backend was dropping _all_ serverside
resources on hide, which is too early e.g. for
GtkGLArea which wants to use egl resources to
unload textures on unrealize.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1485
Matthias Clasen [Sat, 18 May 2019 19:13:49 +0000 (19:13 +0000)]
Merge branch 'button-clicked' into 'master'
Drop gtk_button_clicked
See merge request GNOME/gtk!856
Matthias Clasen [Sat, 18 May 2019 18:23:10 +0000 (14:23 -0400)]
Drop gtk_button_clicked
This is not an api we want to propagate anymore.
If you need to, you can still emit the "clicked"
action signal on a button using g_signal_emit_by_name.
Matthias Clasen [Sat, 18 May 2019 18:22:12 +0000 (14:22 -0400)]
demos: Stop using gtk_button_clicked
Matthias Clasen [Sat, 18 May 2019 18:15:54 +0000 (18:15 +0000)]
gtk: Stop using gtk_button_clicked
This function is going away.
Matthias Clasen [Sat, 18 May 2019 17:12:32 +0000 (17:12 +0000)]
profiling: Add a counter for pixels drawn per frame
This number clearly shows the recently discovered
"full redraws" problem.
Benjamin Otte [Sat, 18 May 2019 15:19:29 +0000 (15:19 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
Closes #1900
See merge request GNOME/gtk!854
Benjamin Otte [Mon, 13 May 2019 22:41:19 +0000 (00:41 +0200)]
build: Convert CSS parser tests to single meson tests
Benjamin Otte [Sat, 18 May 2019 14:54:27 +0000 (16:54 +0200)]
glcontext: Store the updated area in the right place
We need to store the region *before* adding our own damage area, because
we want to only store the changes of this frame, not the whole history.
So do it in the same place Vulkan does it.
Fixes #1900
Benjamin Otte [Sat, 18 May 2019 14:20:39 +0000 (16:20 +0200)]
text: Ensure indexes are ordered properly
Benjamin Otte [Sat, 18 May 2019 14:11:19 +0000 (16:11 +0200)]
widget: Make gtk_widget_render() static
Matthias Clasen [Sat, 18 May 2019 13:13:48 +0000 (13:13 +0000)]
Merge branch 'menubutton-no-button' into 'master'
Menubutton: don't derive from GtkButton
See merge request GNOME/gtk!853
Matthias Clasen [Sat, 18 May 2019 12:57:41 +0000 (12:57 +0000)]
Adapt tests
We no longer have a clicked signal on GtkMenuButton.
Matthias Clasen [Sat, 18 May 2019 04:58:46 +0000 (04:58 +0000)]
Update all users for menubutton changes
Matthias Clasen [Sat, 18 May 2019 04:58:08 +0000 (04:58 +0000)]
a11y: Adapt to menu button changes
Matthias Clasen [Sat, 18 May 2019 04:56:30 +0000 (04:56 +0000)]
menubutton: Don't derive from GtkToggleButton
Make GtkMenuButton a widget that has a
toggle button, instead of deriving from it.
We give it icon-name and label properties,
to let people do what they expect to do
with menu buttons.
Timm Bäder [Sat, 18 May 2019 11:45:19 +0000 (13:45 +0200)]
gl renderer: Render fallback nodes upside down
We stuff both gl-drawn and cairo-drawn textures into the same cache, so
we can't really assume that we need to draw any of them flipped or not.
Fix this by drawing fallback stuff upside down and then using
upside-down vertex data for everything.
Fixes #1897
Timm Bäder [Sat, 18 May 2019 07:36:01 +0000 (09:36 +0200)]
gl renderer: Remove an outdated comment
Timm Bäder [Sat, 18 May 2019 07:33:38 +0000 (09:33 +0200)]
gl renderer: Fix color matrix shader
We *just* computed a un-premultiplied color, maybe we should also use
it.
Timm Bäder [Sat, 18 May 2019 07:22:44 +0000 (09:22 +0200)]
testsuite: Add a color matrix test case
Color matrix nodes with an identity matrix and no offset should still
produce the expected image.
Timm Bäder [Sat, 18 May 2019 07:11:59 +0000 (09:11 +0200)]
gl renderer: Skip invisible shadows
Timm Bäder [Sat, 18 May 2019 06:55:28 +0000 (08:55 +0200)]
gl renderer: Remove useless ops_offset calls
We add the shadow offset manually.
Timm Bäder [Fri, 17 May 2019 06:55:40 +0000 (08:55 +0200)]
issue templates: reproducers should be written in C
I don't want to install a new set of bindings every time someone
attaches a reproducer to a bug. I also don't want to rewrite sait
reproducer in C every time just to eliminate the possibility of broken
bindings.
Timm Bäder [Fri, 17 May 2019 06:42:34 +0000 (08:42 +0200)]
sidebarrow: Don't focus on click
This is sometimes important, e.g. when saving in the filechooser. We
don't want to move the focus out of the filename entry in that case.
Timm Bäder [Fri, 17 May 2019 06:19:42 +0000 (08:19 +0200)]
widget-factory: Add icon-dropshadow class to large icon
Looks stupid without the shadow.
Timm Bäder [Fri, 17 May 2019 05:40:46 +0000 (07:40 +0200)]
filechooserwidget: Remove unused gobject data
Timm Bäder [Fri, 17 May 2019 13:46:06 +0000 (13:46 +0000)]
Merge branch 'fix-non-csd-menu-corners-gtk4' into 'master'
Adwaita: Don't round the non-csd menu corners (GTK4)
See merge request GNOME/gtk!835
Matthias Clasen [Fri, 17 May 2019 11:55:16 +0000 (11:55 +0000)]
Merge branch 'openbsd-pid_get_parenvt-v2' into 'master'
pid_get_parent: fix potential leak of kp
See merge request GNOME/gtk!844
Antoine Jacoutot [Fri, 17 May 2019 11:55:16 +0000 (11:55 +0000)]
pid_get_parent: fix potential leak of kp
Matthias Clasen [Thu, 16 May 2019 20:50:31 +0000 (20:50 +0000)]
Add clock freezes to the profile
Matthias Clasen [Thu, 16 May 2019 20:31:46 +0000 (20:31 +0000)]
Merge branch 'frame-profiling' into 'master'
always record a frame end time when profiling
See merge request GNOME/gtk!850
Matthias Clasen [Thu, 16 May 2019 19:45:30 +0000 (19:45 +0000)]
always record a frame end time when profiling
We need to keep this time, or we may end up with
negative frame intervals.
Matthias Clasen [Thu, 16 May 2019 19:30:23 +0000 (19:30 +0000)]
Merge branch 'frame-profiling' into 'master'
Redo frame profiling
See merge request GNOME/gtk!849
Matthias Clasen [Thu, 16 May 2019 19:08:34 +0000 (19:08 +0000)]
Redo frame profiling
We were adding incomplete frame timings to the
profile, which lead to occasional nonsense
numbers. Instead, only add timings to the profile
once we marked them as complete. This also
gives us an opportunity to add the presentation
time as a marker.
Daniel Mustieles [Thu, 16 May 2019 10:42:05 +0000 (12:42 +0200)]
Updated Spanish translation
Benjamin Otte [Wed, 15 May 2019 23:12:49 +0000 (23:12 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!843
Benjamin Otte [Wed, 15 May 2019 20:18:56 +0000 (22:18 +0200)]
flattenlistmodel: Do proper check
If we want the model items to be listmodels, we don't need to do a ==
comparison. We need to do g_type_is_a(). Implementations of listmodels
are obviously fine.
Matthias Clasen [Wed, 15 May 2019 17:52:12 +0000 (13:52 -0400)]
profiler: Prefer CLOCK_MONOTONIC
This is what g_get_monotonic_time gives us,
after all, and we need to have the same clock
in all our profiler data.
Timm Bäder [Wed, 15 May 2019 15:53:18 +0000 (17:53 +0200)]
query: Remove private pointer
Timm Bäder [Wed, 15 May 2019 05:48:28 +0000 (07:48 +0200)]
filechooserwidget: Remove some unused struct members
Timm Bäder [Wed, 15 May 2019 15:08:21 +0000 (17:08 +0200)]
accellabel: use a box layout
Instead of a GtkBox child widget.
Matthias Clasen [Wed, 15 May 2019 03:28:15 +0000 (03:28 +0000)]
Merge branch 'wip/carlosg/no-x11-core-events' into 'master'
Drop support for X11 core events
See merge request GNOME/gtk!846
Carlos Garnacho [Tue, 14 May 2019 23:10:08 +0000 (01:10 +0200)]
gdk/x11: Remove XI1 remnant
This header is not referenced anywhere.
Carlos Garnacho [Tue, 14 May 2019 22:18:38 +0000 (00:18 +0200)]
gdk/x11: Drop GdkDeviceManagerCore
Keep only the XInput2 device manager, which handles "modern" stuff
like scroll and touch.
Carlos Garnacho [Tue, 14 May 2019 22:04:13 +0000 (00:04 +0200)]
gdk/x11: Make XInput2 a mandatory runtime dependency for x11
Besides requiring it at build time, require that the server the client
is running against exposes the XInput2 protocol. We no longer fallback
on a device manager for core events.
Carlos Garnacho [Tue, 14 May 2019 22:08:37 +0000 (00:08 +0200)]
gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable
Support for core events will be discontinued, so this doesn't make sense
anymore.
Carlos Garnacho [Tue, 14 May 2019 22:02:48 +0000 (00:02 +0200)]
gdk/x11: Remove gdk_disable_multidevice()
Core events will be discontinued, so this call is meaningless now.
Carlos Garnacho [Tue, 14 May 2019 21:48:58 +0000 (23:48 +0200)]
gdk/x11: Make XInput2 a mandatory build time dependency for x11
XInput2 is more than a decade old already, and the input improvements
there (and in every other backend really) make it untenable to have
support for X11 core input events dragging things behind.
Matthias Clasen [Tue, 14 May 2019 20:09:44 +0000 (20:09 +0000)]
Try again to fix profiler setup
We were trying to store the profiler_id
in a struct that does not exist at the time.
Store it somewhere else.
Matthias Clasen [Tue, 14 May 2019 11:59:02 +0000 (11:59 +0000)]
Fix registration of profiler DBus api
Matthias Clasen [Mon, 13 May 2019 19:49:25 +0000 (15:49 -0400)]
profiling: Only use frame timings when we have them
Christian Hergert reported a crash here,
when testing the profiling code.
Timm Bäder [Wed, 8 May 2019 15:04:25 +0000 (17:04 +0200)]
cellrendererpixbuf: Avoid creating expander textures...
... every frame. Create them once when setting the pixbuf instead.
Timm Bäder [Wed, 8 May 2019 15:02:14 +0000 (17:02 +0200)]
cellrendererpixbuf: Remove an unused local variable
Matthias Clasen [Mon, 13 May 2019 19:09:26 +0000 (19:09 +0000)]
Merge branch 'openbsd-pid_get_parent' into 'master'
pid_get_parent: fix for OpenBSD
See merge request GNOME/gtk!841
Antoine Jacoutot [Mon, 13 May 2019 18:47:46 +0000 (20:47 +0200)]
pid_get_parent: fix for OpenBSD
This fixes a long standing bug in pid_get_parent on OpenBSD (which was mine
so... my fault). kp wasn't properly allocated and the function could return
random failures.
Matthias Clasen [Mon, 13 May 2019 17:31:19 +0000 (17:31 +0000)]
Merge branch 'modifier-events' into 'master'
key controller: Don't eat modifier events
Closes #1884
See merge request GNOME/gtk!839
Matthias Clasen [Mon, 13 May 2019 17:01:51 +0000 (17:01 +0000)]
key controller: Don't eat modifier events
The key controller was consuming key events
for modifier keys, for no entirely convincing
reason, which leads to problems when somebody
actually listens for those, such as the simple
input method does for C-S-u processing.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1884